import React from 'react'; 
import { Bar } from '@ant-design/plots';

export default function  BarChart (props) {
  const data = props.monthSalesVolume;
  const config = {
    data,
    label: {
      style: {
        fill: '#3EB7F8',
        opacity: 1,
        fontSize: 12
      }, 
      position: 'right'
    },
    padding: [10, 30, 20, 100], 
    colorField: 'type', // 部分图表使用 seriesField
    color: ['#FF7171', '#FFC571', '#FFF171','#9EFF71','#71B6FF','#A167F5'], 
    height: 250,
    width: 150,  
    xField: 'orderSubmitNum',
    yField: 'categoryName',
    seriesField: 'categoryName', 
    legend: false,
  };
  return <Bar {...config} />;
};
 